Optimal. Leaf size=119 \[ \frac {x}{a+i b}+\frac {2 b \sqrt {x} \log \left (1+\frac {\left (a^2+b^2\right ) e^{2 i \left (c+d \sqrt {x}\right )}}{(a+i b)^2}\right )}{\left (a^2+b^2\right ) d}-\frac {i b \text {PolyLog}\left (2,-\frac {\left (a^2+b^2\right ) e^{2 i \left (c+d \sqrt {x}\right )}}{(a+i b)^2}\right )}{\left (a^2+b^2\right ) d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {3824, 3813,
2221, 2317, 2438} \begin {gather*} -\frac {i b \text {Li}_2\left (-\frac {\left (a^2+b^2\right ) e^{2 i \left (c+d \sqrt {x}\right )}}{(a+i b)^2}\right )}{d^2 \left (a^2+b^2\right )}+\frac {2 b \sqrt {x} \log \left (1+\frac {\left (a^2+b^2\right ) e^{2 i \left (c+d \sqrt {x}\right )}}{(a+i b)^2}\right )}{d \left (a^2+b^2\right )}+\frac {x}{a+i b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2221
Rule 2317
Rule 2438
Rule 3813
Rule 3824
Rubi steps
\begin {align*} \int \frac {1}{a+b \tan \left (c+d \sqrt {x}\right )} \, dx &=2 \text {Subst}\left (\int \frac {x}{a+b \tan (c+d x)} \, dx,x,\sqrt {x}\right )\\ &=\frac {x}{a+i b}+(4 i b) \text {Subst}\left (\int \frac {e^{2 i (c+d x)} x}{(a+i b)^2+\left (a^2+b^2\right ) e^{2 i (c+d x)}} \, dx,x,\sqrt {x}\right )\\ &=\frac {x}{a+i b}+\frac {2 b \sqrt {x} \log \left (1+\frac {\left (a^2+b^2\right ) e^{2 i \left (c+d \sqrt {x}\right )}}{(a+i b)^2}\right )}{\left (a^2+b^2\right ) d}-\frac {(2 b) \text {Subst}\left (\int \log \left (1+\frac {\left (a^2+b^2\right ) e^{2 i (c+d x)}}{(a+i b)^2}\right ) \, dx,x,\sqrt {x}\right )}{\left (a^2+b^2\right ) d}\\ &=\frac {x}{a+i b}+\frac {2 b \sqrt {x} \log \left (1+\frac {\left (a^2+b^2\right ) e^{2 i \left (c+d \sqrt {x}\right )}}{(a+i b)^2}\right )}{\left (a^2+b^2\right ) d}+\frac {(i b) \text {Subst}\left (\int \frac {\log \left (1+\frac {\left (a^2+b^2\right ) x}{(a+i b)^2}\right )}{x} \, dx,x,e^{2 i \left (c+d \sqrt {x}\right )}\right )}{\left (a^2+b^2\right ) d^2}\\ &=\frac {x}{a+i b}+\frac {2 b \sqrt {x} \log \left (1+\frac {\left (a^2+b^2\right ) e^{2 i \left (c+d \sqrt {x}\right )}}{(a+i b)^2}\right )}{\left (a^2+b^2\right ) d}-\frac {i b \text {Li}_2\left (-\frac {\left (a^2+b^2\right ) e^{2 i \left (c+d \sqrt {x}\right )}}{(a+i b)^2}\right )}{\left (a^2+b^2\right ) d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.28, size = 110, normalized size = 0.92 \begin {gather*} \frac {(a-i b) d^2 x+2 b d \sqrt {x} \log \left (1+\frac {(a-i b) e^{2 i \left (c+d \sqrt {x}\right )}}{a+i b}\right )-i b \text {PolyLog}\left (2,-\frac {(a-i b) e^{2 i \left (c+d \sqrt {x}\right )}}{a+i b}\right )}{\left (a^2+b^2\right ) d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.83, size = 0, normalized size = 0.00 \[\int \frac {1}{a +b \tan \left (c +d \sqrt {x}\right )}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 264 vs. \(2 (100) = 200\).
time = 0.59, size = 264, normalized size = 2.22 \begin {gather*} \frac {{\left (a - i \, b\right )} d^{2} x - 2 i \, b d \sqrt {x} \arctan \left (\frac {2 \, a b \cos \left (2 \, d \sqrt {x} + 2 \, c\right ) - {\left (a^{2} - b^{2}\right )} \sin \left (2 \, d \sqrt {x} + 2 \, c\right )}{a^{2} + b^{2}}, \frac {2 \, a b \sin \left (2 \, d \sqrt {x} + 2 \, c\right ) + a^{2} + b^{2} + {\left (a^{2} - b^{2}\right )} \cos \left (2 \, d \sqrt {x} + 2 \, c\right )}{a^{2} + b^{2}}\right ) + b d \sqrt {x} \log \left (\frac {{\left (a^{2} + b^{2}\right )} \cos \left (2 \, d \sqrt {x} + 2 \, c\right )^{2} + 4 \, a b \sin \left (2 \, d \sqrt {x} + 2 \, c\right ) + {\left (a^{2} + b^{2}\right )} \sin \left (2 \, d \sqrt {x} + 2 \, c\right )^{2} + a^{2} + b^{2} + 2 \, {\left (a^{2} - b^{2}\right )} \cos \left (2 \, d \sqrt {x} + 2 \, c\right )}{a^{2} + b^{2}}\right ) - i \, b {\rm Li}_2\left (\frac {{\left (i \, a + b\right )} e^{\left (2 i \, d \sqrt {x} + 2 i \, c\right )}}{-i \, a + b}\right )}{{\left (a^{2} + b^{2}\right )} d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 534 vs. \(2 (100) = 200\).
time = 0.43, size = 534, normalized size = 4.49 \begin {gather*} \frac {2 \, a d^{2} x - 2 \, b c \log \left (\frac {{\left (i \, a b + b^{2}\right )} \tan \left (d \sqrt {x} + c\right )^{2} - a^{2} + i \, a b + {\left (i \, a^{2} + i \, b^{2}\right )} \tan \left (d \sqrt {x} + c\right )}{\tan \left (d \sqrt {x} + c\right )^{2} + 1}\right ) - 2 \, b c \log \left (\frac {{\left (i \, a b - b^{2}\right )} \tan \left (d \sqrt {x} + c\right )^{2} + a^{2} + i \, a b + {\left (i \, a^{2} + i \, b^{2}\right )} \tan \left (d \sqrt {x} + c\right )}{\tan \left (d \sqrt {x} + c\right )^{2} + 1}\right ) + i \, b {\rm Li}_2\left (\frac {2 \, {\left ({\left (i \, a b - b^{2}\right )} \tan \left (d \sqrt {x} + c\right )^{2} - a^{2} - i \, a b + {\left (i \, a^{2} - 2 \, a b - i \, b^{2}\right )} \tan \left (d \sqrt {x} + c\right )\right )}}{{\left (a^{2} + b^{2}\right )} \tan \left (d \sqrt {x} + c\right )^{2} + a^{2} + b^{2}} + 1\right ) - i \, b {\rm Li}_2\left (\frac {2 \, {\left ({\left (-i \, a b - b^{2}\right )} \tan \left (d \sqrt {x} + c\right )^{2} - a^{2} + i \, a b + {\left (-i \, a^{2} - 2 \, a b + i \, b^{2}\right )} \tan \left (d \sqrt {x} + c\right )\right )}}{{\left (a^{2} + b^{2}\right )} \tan \left (d \sqrt {x} + c\right )^{2} + a^{2} + b^{2}} + 1\right ) + 2 \, {\left (b d \sqrt {x} + b c\right )} \log \left (-\frac {2 \, {\left ({\left (i \, a b - b^{2}\right )} \tan \left (d \sqrt {x} + c\right )^{2} - a^{2} - i \, a b + {\left (i \, a^{2} - 2 \, a b - i \, b^{2}\right )} \tan \left (d \sqrt {x} + c\right )\right )}}{{\left (a^{2} + b^{2}\right )} \tan \left (d \sqrt {x} + c\right )^{2} + a^{2} + b^{2}}\right ) + 2 \, {\left (b d \sqrt {x} + b c\right )} \log \left (-\frac {2 \, {\left ({\left (-i \, a b - b^{2}\right )} \tan \left (d \sqrt {x} + c\right )^{2} - a^{2} + i \, a b + {\left (-i \, a^{2} - 2 \, a b + i \, b^{2}\right )} \tan \left (d \sqrt {x} + c\right )\right )}}{{\left (a^{2} + b^{2}\right )} \tan \left (d \sqrt {x} + c\right )^{2} + a^{2} + b^{2}}\right )}{2 \, {\left (a^{2} + b^{2}\right )} d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{a + b \tan {\left (c + d \sqrt {x} \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{a+b\,\mathrm {tan}\left (c+d\,\sqrt {x}\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________